#ifndef RANDOMTHREAD_H
#define RANDOMTHREAD_H

#include <QThread>

class RandomThread : public QThread
{
    Q_OBJECT;
public:
    explicit RandomThread(QThread *parent = nullptr);

    void run() override;

signals:
    void Generate(const std::vector<int>& nums);//自定义信号

public slots:

private:

};


class SortThread : public QThread
{
    Q_OBJECT;
public:
    explicit SortThread(QThread *parent = nullptr);

    void SetNums(std::vector<int>& nums)
    {
        this->nums = nums;
    }

    void run() override;

signals:
    void SortFinished(const std::vector<int>& nums);//自定义信号

public slots:

private:
    std::vector<int> nums;
};

#endif // RANDOMTHREAD_H
